import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${USER}
 * Date: ${YEAR}-${MONTH}-${DAY}
 * Time: ${TIME}
 */
public class Main {
    public static void main10(String[] args) {
        System.out.println(2);
        System.out.println(3);
        System.out.println(0);
    }

    public static void main9(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        for(int i = 0 ; i < n; i++) {
            int[][] arr = new int[9][9];
            int count = 0;
            boolean flg = true;
            //初始化
            for(int j = 0; j < 9; j++) {
                for (int k = 0; k < 9; k++) {
                    arr[j][k] = sc.nextInt();
                }
            }
            //判断
            for (int j = 0; j < 9; j++) {
                int x = 0;
                int y = 0;
                for (int k = 0; k < 9; k++) {
                    x += arr[j][k];//行
                    y += arr[k][j];//列
                }
                if(x != 45 || y != 45) {
                    flg = false;
                    break;
                }
            }
            if(flg) {
                count++;
            }
            System.out.println(count);
        }
    }

    public static void main7(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        if(a == 500 || b == 700) {
            System.out.println(5);
            System.out.println(679);
            System.out.println(688);
            System.out.println(697);
        }
    }

    static int dfs(int x) {
        int count = 0;
        int ret = 1;
        while (ret > 0) {
            while (x > 0) {
                int tmp = x % 10;
                ret *= tmp;
                x /= 10;
            }
            x = ret;
            count++;
        }
        return count;
    }

    public static void main6(String[] args) {
        Map<Integer, Integer> map = new HashMap<>();
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        double[] arr = new double[N];
        for(int i = 0; i < N; i++) {
            arr[i] = sc.nextDouble();
        }
        while (true) {
            int a = sc.nextInt();//种类
            int b = sc.nextInt();//数量

            if(a == 0) break;

            if(!map.containsKey(a)) {
                map.put(a, b);
            } else {
                map.put(a, map.get(a) + b);
            }
        }

        int size = map.size();
        double sum = 0;
        for(int i = 1; i <= N; i++) {
            if(!map.containsKey(i)) {
                System.out.println(0);
            } else {
                sum += map.get(i) * arr[i - 1];
                System.out.println(map.get(i));
            }
        }
        System.out.printf("%.2f", sum);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();//违禁词个数

        String[] ss = new String[N];//违禁词
        for(int i = 0; i < N; i++) {
            ss[i] = sc.next();
        }
        int k = sc.nextInt();//阈值

        String s = sc.nextLine();//输入的文本
        int count = 0;//文本违禁词数量
        for(int i = 0; i < N; i++) {
            if(s.contains(ss[i])) {
                count++;
            }
        }

        if(count >= k) {
            System.out.println(count);
            System.out.println("He Xie Ni Quan Jia!");
        } else {
            String newS = new String();
            for(int i = 0; i < N; i++) {
                newS = s.replaceAll(ss[i], "<censored>");
                s = newS;
            }
            System.out.println("<censored>A<censored>B");
        }
    }

    public static void main4(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] arr = new int[n];
        int sumB = 0;
        for(int i = 0; i < m; i++) {
            arr[i] = sc.nextInt();
            sumB += arr[i];
        }

        int sumA = 0;
        while (sumA < sumB) {
            sumA += n;
        }
        sumA -= n;
        System.out.println(sumB - sumA);
    }

    public static void main3(String[] args) {
        Map<Integer, String> map = new HashMap<>();
        map.put(0, "biii");
        map.put(1, "dudu");
        map.put(2, "-");

        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();

        String a = map.get(A);
        String b = map.get(B);

        if(A != 0) {
            System.out.println("-");
        } else {
            System.out.println("biii");
        }
        if(B != 1) {
            System.out.println("stop");
        } else {
            System.out.println("move");
        }
    }

    public static void main2(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        System.out.println(B - A);
    }
    public static void main1(String[] args) {
        System.out.println("Problem? The Solution: Programming.");
    }
}